package com.huangmb.anymark.server.utils;

import javax.servlet.http.HttpSession;
import java.util.Enumeration;

/**
 * @author hmb
 * @version 1.0
 * @since 2016/5/6 14:54
 */
public class SessionUtils {
    public static final void clear(HttpSession session){
        try {
            Enumeration<String> names = session.getAttributeNames();
            while (names.hasMoreElements()) {
                session.removeAttribute(names.nextElement());
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
